package com.swiftride.fallback;

import com.swiftride.feign.OrderFeign;
import com.swiftride.result.R;
import org.springframework.cloud.openfeign.FallbackFactory;

public class OrderFeignFallbackFactory implements FallbackFactory<OrderFeign> {
    @Override
    public OrderFeign create(Throwable cause) {
        return new OrderFeign() {
            @Override
            public R customerCancelOrder(String orderNo) {
                return R.error();
            }

            @Override
            public R driverCancelOrder(String orderNo) {
                return R.error();
            }
        };
    }
}
